INTERRUPT: 10H VIDEO SERVICES Functions 00H thru 08H FUNCTION: 00H SET VIDEO MODE - selects and installs a new video display mode CALL: AH = 0 AL = display mode 00H - 40x25 B/W text, color adapter 01H - 40x25 color text 02H - 80x25 B/W text 03H - 80x25 color text 04H - 320x200 graphics, 4 color 05H - same as 04H, color burst off 06H - 640x200 graphics, 2 color 07H - 80x25 monochrome text 08H - PCjr 09H - PCjr 0AH - PCjr 0DH - 320x200 graphics, 16 color 0EH - 640x200 graphics, 16 color 0FH - 640x350 monochrome graphics 10H - 640x350 graphics, 16 color See reference book for additional Multi-Sync monitor modes FUNCTION: 01H SET CURSOR TYPE - selects the starting and ending scan lines for blinking cursor; text modes only. CALL: AH = 01H CH = starting scan line for cursor CL = ending scan line for cursor ANY KEY FOR MORE - PRIOR MENU - EXIT@ FUNCTION: 02H SET CURSOR POSITION - positions cursor on specified video page CALL: AH = 02H BH = video page number DH = row (1st display row = 0) DL = column (1st display column = 0) FUNCTION: 03H READ CURSOR STATUS - returns the current position and size of the cursor; text modes only. CALL: AH = 03H BH = video page number RETURNS: CH = starting scan line CL = ending scan line DH = row (1st display row = 0) DL = column (1st column = 0) FUNCTION: 04H READ LIGHT PEN POSITION - see manual for details FUNCTION: 05H SELECT DISPLAY PAGE - selects the active video page CALL: AH = 05H AL = video page number (0 thru 7, depending on mode and adapter) ANY KEY FOR MORE - PRIOR PAGE - PRIOR MENU - EXIT@ FUNCTION: 06H INITIALIZE WINDOW OR SCROLL WINDOW UP - initializes and clears a specified window or scrolls the contents of a window up. CALL: AH = 06H AL = number of rows to scroll up (if 0, clears entire window) BH = attribute for blanked out area CH = upper left row of window CL = upper left column of window DH = lower right row of window DL = lower right column of window FUNCTION: 07H INITIALIZE WINDOW OR SCROLL WINDOW DOWN - initializes and clears a specified window or scrolls the contents of a window down. CALL: AH = 07H AL = number of rows to scroll down (if 0, clears entire window) BH = attribute for blanked out area CH = upper left row of window CL = upper left column of window DH = lower right row of window DL = lower right column of window FUNCTION: 08H READ ATTRIBUTE AND CHARACTER AT CURSOR - returns the ASCII character code and the attribute at the current cursor position. CALL: AH = 08H AL = video page number RETURNS: AH = attribute byte AL = ASCII character code - PRIOR PAGE - PRIOR MENU - EXIT$ INTERRUPT: 10H VIDEO SERVICES Functions 09H thru 0EH FUNCTION: 09H WRITE CHARACTER(S) AND ATTRIBUTE AT CURSOR - displays a character and attribute one or more times at the cursor position; does not recognize control codes - LF, CR, BS, etc -; does not update cursor position; use function 02H to move cursor to next position. CALL: AH = 09H AL = ASCII character code to be displayed BH = video page BL = attribute (text mode) or color (graphics mode) CX = repetition factor (number of times to display character) FUNCTION: 0AH WRITE CHARACTER(S) ONLY AT CURSOR - displays a character only, one or more times at the cursor position; character assumes the current attribute; does not recognize control codes - LF, CR, BS, etc -; does not update cursor position; use function 02H to move cursor to next position. CALL: AH = 0AH AL = ASCII character code to be displayed BH = video page BL = immaterial (text mode) or color (graphics mode) CX = repetition factor (number of times to display character) ANY KEY FOR MORE - PRIOR MENU - EXIT@ FUNCTION: 0BH SET BORDER COLOR OR SELECT 4 COLOR PALETTE - parameters below are valid for CGA adapter; in text mode, border can be set to a specific color; in graphics mode (320x200), selects one of two different, 4 color palettes; see manual for details relating to other adapters. CALL: AH = 0BH BH = 0 to set border 1 to select palette BL = border color value if BH = 0 palette value (0 or 1) if BH = 1 FUNCTION: 0CH WRITE GRAPHICS PIXEL - displays one pixel at a specified location; parameters below are valid for CGA adapter, see manual for details relating to other adapters. CALL: AH = 0CH AL = pixel value 0 - 3 acceptable values for modes 04H and 05H 0 or 1 acceptable values for mode 06H if bit 7 = 1, new value XOR'd with current pixel value CX = x graphics coordinate (acceptable range is mode dependent) DX = y graphics coordinate (acceptable range is mode dependent) ANY KEY FOR MORE - PRIOR PAGE - PRIOR MENU - EXIT@ FUNCTION: 0DH READ GRAPHICS PIXEL - returns current value of a pixel at a specified location; parameters below are valid for CGA adapter, see manual for details relating to other adapters. CALL: AH = 0DH CX = x graphics coordinate (acceptable range is mode dependent) DX = y graphics coordinate (acceptable range is mode dependent) RETURNS: AL = pixel value 0 - 3 acceptable values for modes 04H and 05H 0 or 1 acceptable values for mode 06H FUNCTION: 0EH WRITE CHARACTER IN TELETYPE (TTY) MODE - displays a character at the current cursor position on the current video page; recognizes control characters - LF, CR, BS, etc; updates cursor position; recognizes maximum display columns and rows and will scroll screen automatically; in text mode, character displayed assumes current attribute. CALL: AH = 0EH AL = ASCII code to be displayed BL = foreground pixel value (graphics) - PRIOR PAGE - PRIOR MENU - EXIT$ INTERRUPT: 10H VIDEO SERVICES Functions 0F thru 1CH FUNCTION: 0FH RETURN CURRENT VIDEO STATUS - returns information about the current video mode. CALL: AH = 0FH RETURNS: AH = number of displayed character columns AL = video mode (see function 00H for mode descriptions) BH = active video page SEE A MANUAL FOR THE FOLLOWING INT 10H FUNCTIONS: 10H - Set Palette Registers, Set Intensity/Blink Attribute 11H - Character Generator Interface 12H - Video Subsystem Configuration (Alternate Select) 13H - Display Character String 1AH - Video Display Combination 1BH - Video Bios Functionality/State Information 1CH - Save or Restore Video State - PRIOR MENU - EXIT$ INTERRUPT: 011H EQUIPMENT DETERMINATION - returns information about the current system configuration. CALL: No input required RETURNS: AX = Equipment Information Bit Description 15,14 Number of printers installed 13 Not Used 12 Game Adapter attached 11-9 Number of RS232 cards 8 Unused 7,6 Number disk drives (if Bit 0=1, 00=1, 01=2, 10=3, etc.) 5,4 Video Mode 00 Unused 01 40x25 color card 10 80x25 color card 11 80x25 monochrome 3,2 RAM on motherboard 00 16K 01 32K 10 48K 11 64K 1 Not used 0 1 disk drive(s) installed - PRIOR MENU - EXIT$ INTERRUPT: 12H MEMORY SIZE DETERMINATION - returns the amount of installed RAM on the motherboard CALL: No input required RETURNS: AX = kilobytes of installed memory - PRIOR MENU - EXIT$ INTERRUPT: 13H DISK SERVICES FUNCTION: 00H RESET DISK - resets the disk controller and prepares for disk I/O. CALL: AH = 00H FUNCTION: 01H GET DISK SYSTEM STATUS - returns the status of the disk system after the last disk operation. CALL: AH = 01H DL = 0 to 3 for floppies and 80H-87H for hard disk RETURNS: if successful, Carry Flag = Clear if unsuccessful, Carry Flag = Set AL = error code from last operation 00 No error 01 invalid command 02 address mark not found 03 write protect error 04 sector not found 05 reset failed 07 invalid drive parameter 09 DMA segment wrap 0BH bad track flag 10H bad error check 11H data error corrected 20H controller failure 40H seek failure 80H no disk response 0BBH undefined error 0FFH sense operation failure ANY KEY FOR MORE - PRIOR MENU - EXIT@ FUNCTION: 02H/03H READ/WRITE SECTORS - reads/writes specific sector(s) between RAM and the disk; should only be used with great care and a thorough understanding of disk/drive architecture; use DOS INT 25H or 26H if direct sector operations required, otherwise use INT 21H functions. CALL: AH = 02H if sector read 03H if sector write AL = number of sectors (8 max - floppies, 80H max - hard disk) DL = drive number (0-3 for floppies, 80-87H for hard disk) DH = head number CL = sector # (bits 0-5, bits 6,7 for cylinder #s >0FFH) CH = cylinder # (low 8 bits if >0FFH) or track # (floppies) ES:BX = Segment:Offset of buffer for reads/writes RETURNS: if successful - Carry Flag = Clear if unsuccessful - Carry Flag = Set AH = error code - see function 01H) FUNCTION: 04H VERIFY DISK SECTORS - verifies the specified sectors on the disk; errors will be returned in AH. CALL: AH = 04H AL = number of sectors DX and CX - see Function 02H RETURNS: if successful - Carry Flag = Clear if unsuccessful - Carry Flag = Set AH = error code - see function 01H) ANY KEY FOR MORE - PRIOR PAGE - PRIOR MENU - EXIT@ SEE A MANUAL FOR THE FOLLOWING INT 13H FUNCTIONS: 05H Format Track 06H Format Track and Set Bad Sector Flags (hard disk only) 07H Format Disk Starting At Specified Track " 08H Return Drive Parameters " 09H Initialize Drive " 0AH Read Long Sectors " 0BH Write Long Sectors " 0CH Seek " 0DH Alternate Disk Reset " 0EH Read Sector Buffer " 0FH Write Sector Buffer " 10H Test Drive Ready " 11H Recalibrate Drive " 12H RAM Diagnostic " 13H Drive Diagnostic " 14H Controller Diagnostic " - PRIOR PAGE - PRIOR MENU - EXIT$ INTERRUPT: 14H SERIAL PORT SERVICES FUNCTION: 00H INITIALIZE SERIAL PORT - initializes the serial port to a desired baud rate, parity, word length and the number of stop bits. CALL: AH = 00H AL = initialization parameter Bit 1,0: 10 = 7 bit word, 11 = 8 bit word Bit 2 : 0 = 1 stop bit, 1 = 2 stop bits Bits 4,3: 00 = no parity, 01 = odd parity, 11 = even parity Bits 7,6,5: 000 = 110 Baud, 001 = 150 Baud, 010 = 300 Baud 011 = 600 Baud, 100 = 1200 Baud, 101 = 2400 Baud 110 = 4800 Baud, 111 = 9600 Baud DX = port number (0 = COM1, 1 = COM2, etc.) FUNCTION: 01H WRITE CHARACTER TO SERIAL PORT - writes a character to the serial port, returning the current port status. CALL: AH = 01H AL = character to be sent DX = port number (0 = COM1, 1 = COM2, etc.) RETURNS: if successful AH bit 7 = 0 AL = unchanged if unsuccessful AH bit 7 = 1 AL = unchanged See Function 03H for meaning of Bits 0-6 in AH ANY KEY FOR MORE - PRIOR MENU - EXIT@ FUNCTION: 02H READ CHARACTER FROM SERIAL PORT - reads a character to the serial port, returning the current port status. CALL: AH = 02H DX = port number (0 = COM1, 1 = COM2, etc.) RETURNS: if successful AH bit 7 = 0 AL = character received if unsuccessful AH bit 7 = 1 See Function 03H for meaning of Bits 0-6 in AH FUNCTION: 03H SERIAL PORT STATUS - returns the status of the specified serial port. CALL: AH = 02H DX = port number (0 = COM1, 1 = COM2, etc.) RETURNS: AH = port status (Bits 0-6 returned in AH in Functions 01H, 02H) Bit 7 set - timed out Bit 6 set - shift register empty Bit 5 set - hold register empty Bit 4 set - break detected Bit 3 set - framing error Bit 2 set - parity error Bit 1 set - overrun error Bit 0 set - data ready ANY KEY FOR MORE - PRIOR PAGE - PRIOR MENU - EXIT@ RETURNS:(contd) AL = modem status Bit 7 set - receive line signal detected Bit 6 set - ring indicator Bit 5 set - data set ready Bit 4 set - clear to send Bit 3 set - change in receive line signal detected Bit 2 set - trailing edge ring indicator Bit 1 set - change in data set ready Bit 0 set - change in clear to send - PRIOR PAGE - PRIOR MENU - EXIT$ INTERRUPT: 16h KEYBOARD SERVICES FUNCTION: 00H READ CHARACTER FROM KEYBOARD - waits for a key to be pressed and then returns its ASCII character code and scan code. CALL: AH = 00H RETURNS: AH = keyboard scan code AL = ASCII character code FUNCTION: 01H READ KEYBOARD STATUS - determines if a character is ready to be read; if so returns a flag and the character; character remains in the buffer awaiting a read call. CALL: AH = 01H RETURNS: if key waiting Zero Flag = Clear AH = scan code AL = ASCII character code if no key waiting Zero Flag = Set ANY KEY FOR MORE - PRIOR MENU - EXIT@ FUNCTION: 01H READ KEYBOARD FLAGS - returns the BIOS flag byte describing the state of the various keyboard toggle and shift keys. CALL: AH = 02H RETURNS: AL = keyboard flag byte Bit 7 set - Insert on Bit 6 set - Caps Lock on Bit 5 set - Num Lock on Bit 4 set - Scroll Lock on Bit 3 set - Alt key down Bit 2 set - Ctl key down Bit 1 set - Left Shift down Bit 0 set - Right Shift down - PRIOR PAGE - PRIOR MENU - EXIT$ INTERRUPT: 17H PRINTER SERVICES FUNCTION: 00H WRITE CHARACTER TO PRINTER - sends a character to specified parallel printer and returns the current status of port. CALL: AH = 00H AL = ASCII character code to be sent DX = printer number (0 -2) RETURNS: AH = printer status Bit 7 set - print not busy Bit 6 set - acknowledge Bit 5 set - out of paper Bit 4 set - printer selected Bit 3 set - I/O error Bit 2 set - unused Bit 1 set - unused Bit 0 set - timed out FUNCTION: 01H INITIALIZE PRINTER PORT - initializes the specified printer port and returns its status. CALL: AH = 01H DX = printer number (0 -2) RETURNS: AH = printer status See Function 00H for details ANY KEY FOR MORE - PRIOR MENU - EXIT@ FUNCTION: 02H PRINTER STATUS REQUEST - returns the status of the specified printer port. CALL: AH = 02H DX = printer number (0 -2) RETURNS: AH = printer status See Function 00H for details - PRIOR PAGE - PRIOR MENU - EXIT$ INTERRUPT: 1AH TIME OF DAY SERVICES FUNCTION: 00H READ TIME OF DAY - returns the value of the system timer expressed in the number of ticks since midnight; 18.204 ticks = 1 second; 65,536 ticks per hour; can be used to time an event. CALL: AH = 00H RETURNS: CX = high word of count (the hour in a 24 hour day) DX = low word of count AL = 0 if timer has not passed 24 hours since last read FUNCTION: 01H SET TIME OF DAY - sets the value of the system timer using the same format as returned in Function 00H. CALL: AH = 01H RETURNS: CX = high word of count (the hour of a 24 hour day) DX = low word of count - PRIOR MENU - EXIT$